<template>
	<view>
		<back :showBackText="false" customClass="bg-gradual-blue text-white" title="绑定手机"></back>
		<view v-if="!checkAppIsAudit">
			<safeCheck :sid.sync="mobile" :scene="30" :status.sync="showConfirm" confirmText="确认输入"
				confirmTextClass="cuIcon-roundcheck" @complete="safeCheckCompleteTap"></safeCheck>
			<view class="cu-form-group margin-top">
				<view class="title">手机号码</view>
				<input @input="mobileInputTap" maxlength="11" placeholder="请输入绑定手机号" placeholderStyle="color:#999;"
					:value="user.mobile ? user.mobile : ''" :disabled="isBind ? true : false" type="number" />
				<button @tap="verifyTap" :disabled="isBind" class="cu-btn shadow bg-green">{{ countDown }}</button>
			</view>
			<view class="cu-form-group margin-top" v-if="!isBind">
				<view class="title">短信验证</view>
				<input @input="verifyCodeInputTap" maxlength="6" placeholder="请输入短信验证码" placeholderStyle="color:#999;"
					type="number" />
			</view>
			<view class="padding flex flex-direction">
				<button @tap="bindTap" class="cu-btn bg-blue lg" v-if="!isBind">确认绑定</button>
				<button @tap="setPassTap" class="cu-btn bg-blue lg" v-if="isBind">设置登录密码</button>
			</view>
		</view>
		<view class="cu-bar bg-white solid-bottom" style="">
			<view class="action">
				<text class="cuIcon-title text-red"></text>
				帮助信息
			</view>
		</view>
		<view class="cu-list menu">
			<view class="cu-item">
				<view class="content">
					<text class="cuIcon-newfill text-grey"></text>
					<text class="text-grey">绑定后可设置登录密码</text>
				</view>
			</view>
			<view class="cu-item">
				<view class="content">
					<text class="cuIcon-newfill text-grey"></text>
					<text class="text-grey">设置密码可多人共享账号</text>
				</view>
			</view>
		</view>
		<adfootbanner unitId="adunit-1fb0622d11b3c262"></adfootbanner>
	</view>
</template>
<style src="./bindmobile.css"></style>
<script src="./bindmobile.js"></script>